<?php

class Spell
{
    public $id;
	public $remainRound;
	public $effect;

	public function __construct($lastRound, $effect)
	{
		$this->remainRound=$lastRound;
		$this->effect=$effect;
	}

	public function apply(&$pet)
	{
		if($this->remainRound>0){
			eval($effect);
			--$this->remainRound;
		}
	}

	public function finished()
	{
		$this->remainRound<=0;
	}
}

?>
